home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 9 / 009.d81 / pps #20 < prev    next >
Text File  |  2022-08-26  |  3KB  |  149 lines

  1.  
  2.     Peeks, Pokes, and Syses, PART 20
  3.  
  4.            by Jimmy Weiler
  5.  
  6.  
  7. ======================================
  8.  
  9. Location: 203        Hexadecimal:$00CB
  10. Official Label: SFDX          Type:RAM
  11. Useful BASIC commands:            PEEK
  12.  
  13. --------------------------------------
  14.  
  15. SFDX is a lot like LSTX. (You remember
  16.  
  17. LSTX -- we covered that in part 10.)
  18.  
  19. You can peek SFDX to find out what key
  20.  
  21. is being held down.  There is no
  22.  
  23. obvious relationship between a key and
  24.  
  25. the number you will find in SFDX when
  26.  
  27. you press that key.  That's what this
  28.  
  29. chart is for:
  30.  
  31. --------------------------------------
  32.         SFDX key value chart
  33. --------------------------------------
  34.  
  35.  0 = inst/del    33 = i
  36.  1 = return      34 = j
  37.  2 = _crsr       35 = 0
  38.  3 = f7/f8       36 = m
  39.  4 = f1/f2       37 = k
  40.  5 = f3/f4       38 = o
  41.  6 = f5/f6       39 = n
  42.  7 = ^crsr       40 = +
  43.  8 = 3           41 = p
  44.  9 = w           42 = l
  45. 10 = a           43 = -
  46. 11 = 4           44 = .
  47. 12 = z           45 = :
  48. 13 = s           46 = @
  49. 14 = e           47 = ,
  50. 15 = not used    48 = \
  51. 16 = 5           49 = *
  52. 17 = r           50 = ;
  53. 18 = d           51 = clr/home
  54. 19 = 6           52 = not used
  55. 20 = c           53 = <equals sign>
  56. 21 = f           54 = ^
  57. 22 = t           55 = /
  58. 23 = x           56 = 1
  59. 24 = 7           57 = _
  60. 25 = y           58 = not used
  61. 26 = g           59 = 2
  62. 27 = 8           60 = space
  63. 28 = b           61 = not used
  64. 29 = h           62 = q
  65. 30 = u           63 = run/stop
  66. 31 = v           64 = no key pressed
  67. 32 = 9
  68.  
  69.  
  70.  
  71. ======================================
  72.  
  73.  
  74. Location: 204        Hexadecimal: 00CC
  75. Official label: BLNSW        Type: RAM
  76. Useful BASIC commands:            POKE
  77.  
  78. --------------------------------------
  79.  
  80. BLNSW is the Blink Switch.  If its
  81.  
  82. value is one, a GET statement will not
  83.  
  84. display a cursor.  That is the normal
  85.  
  86. state for a Commodore 64.  If you poke
  87.  
  88. BLNSW to zero immediately before a
  89.  
  90. GET statement, then a cursor will
  91.  
  92. blink as you process the GET.
  93.  
  94. Here's how:
  95.  
  96.  
  97. 100 poke204,0:getk$:ifk$=""then100
  98.  
  99.  
  100. Pretty dull stuff.  Let's do something
  101.  
  102. interesting with it.  Let's see ....
  103.  
  104. something that uses a GET statement
  105.  
  106. with a displayed cursor and checks to
  107.  
  108. see which keys are being pressed...
  109.  
  110. Sounds like an input routine to me.
  111.  
  112.   So here's the plan -- We'll write
  113.  
  114. a subroutine to get a line of input
  115.  
  116. from the keyboard.  There will be a
  117.  
  118. blinking cursor on screen where the
  119.  
  120. letters you type will appear.  All
  121.  
  122. text and graphics characters will be
  123.  
  124. accepted as input, but all function
  125.  
  126. keys, inst, del, clr, home, and the
  127.  
  128. up, down and right crsr movement will
  129.  
  130. be disabled.  CRSR LEFT will backspace
  131.  
  132. and erase the letters it spaces over.
  133.  
  134. When you press return, the line you
  135.  
  136. have typed will be assigned to a
  137.  
  138. string.  If you type a quote you will
  139.  
  140. not enter 'quote mode'.
  141.  
  142.   Sounds sorta challenging.  Let's
  143.  
  144. see if we can fit it all into less
  145.  
  146. than 20 BASIC statements.
  147.  
  148. --------<continued in part 21>--------
  149.